#include "SudokuCellValidator.h"

SudokuCellValidator::SudokuCellValidator(QObject* parent) : QIntValidator(1, 1, parent)
{
}


QValidator::State SudokuCellValidator::validate(QString& input, int& pos) const
{
    // Do not accept "0" as first digit
    if(pos == 1 && input == "0")
        return QValidator::Invalid;

    return QIntValidator::validate(input, pos);
}
